package com.example.demo.test;

import com.example.demo.mapper.UserMapper;
import com.example.demo.pojo.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;

import javax.annotation.Resource;

/**
 * @author Administrator
 */
@SpringBootTest //普通的测试类是无法获取bean的,需要加上该注解，不然mybatisplus运行报空指针
public class mybatisPlus {

    @Autowired
    private UserMapper userMapper;


    @Test
    public void test() {
        userMapper.selectList(null).forEach(System.out::println);
    }
}
